quartz: GdkDeviceCore: check for NULL pointer
authorKristian Rietveld <kris@gtk.org>
Wed, 22 Dec 2010 16:08:25 +0000 (17:08 +0100)
committerKristian Rietveld <kris@gtk.org>
Wed, 22 Dec 2010 16:47:04 +0000 (17:47 +0100)
gdk/quartz/gdkdevice-core.c

index 3244a438c55ee4714b0a852e9a92c6817fa436ed..65c24fa89022e9ccf05674ee08d7f1dd84bd12d3 100644 (file)
@@ -241,8 +241,11 @@ gdk_device_core_query_state_helper (GdkWindow       *window,
     translate_coords_to_child_coords (window, found_window,
                                       &x_tmp, &y_tmp);
 
-  *x = x_tmp;
-  *y = y_tmp;
+  if (x)
+    *x = x_tmp;
+
+  if (y)
+    *y = y_tmp;
 
   return found_window;
 }